package com.nine.action;

import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts2.ServletActionContext;

import com.nine.IService.OrderService;
import com.nine.IService.OrderService;
import com.nine.IService.OrderitemService;
import com.nine.entity.Order;
import com.nine.entity.Orderitem;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;

public class PointDetailAction extends ActionSupport{
	OrderService orderService;
	public OrderService getOrderService() {
		return orderService;
	}
	public void setOrderService(OrderService orderService) {
		this.orderService = orderService;
	}
	public Order getOrder() {
		return order;
	}
	public void setOrder(Order order) {
		this.order = order;
	}
	Order order;
public String getPointDetail(){
	ActionContext ctx=ActionContext.getContext();
	String customerId=(String) ctx.getSession().get("CUSTOMER_ID");
	List<Order> orderList=orderService.getOrderList(customerId);
	HttpServletRequest request=(HttpServletRequest)ctx.get(ServletActionContext.HTTP_REQUEST);
	request.setAttribute("orderList", orderList);
	return SUCCESS;
}
}
